package com.sg.dto.biz.framework.common;


import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;


/**
 * @desc PostDto
 * @使用场景
 */
@Data
public class PostDto extends BaseDto implements Serializable {

    /**
     * 职位ID:
     */
    @NotNull(message = "职位ID不能为空")
    @ApiModelProperty("职位ID")
    private String postId;

    /**
     * 职位名称:
     */
    @NotNull(message = "职位名称不能为空")
    @ApiModelProperty("职位名称")
    private String postName;
    /**
     * 职位编号
     */
    @ApiModelProperty("职位编号")
    private String postNumber;
    /**
     * 主体生命周期
     */
    @ApiModelProperty("主体生命周期")
    private String subjectLifeCycle;

    /**
     * 操作人就职记录ID
     */
    @ApiModelProperty("操作人就职记录ID")
    private String operationInductionId;

    /**
     * 操作时间
     */
    @ApiModelProperty("操作时间")
    private Date operateTime;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        PostDto that = (PostDto) o;
        return postId == that.postId && postName == that.postName && postNumber == that.postNumber && subjectLifeCycle == that.subjectLifeCycle && operationInductionId == that.operationInductionId && operateTime == that.operateTime;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), postId, postName, postNumber, subjectLifeCycle, operationInductionId, operateTime);
    }

}
